import React, { Component } from 'react';
import PageWrapper from '../../components/pages';
import {observer} from 'mobx-react';

@observer
export default class Message extends Component {

  constructor(props){
    super(props);
    this.onReset = this.onReset.bind(this);
  }

  onReset () {
    this.props.appState.resetTimer();
  }

  render() {
    return (
      <PageWrapper>
        <div>this pages is Messages!</div>
        <button onClick={this.onReset}>Seconds passed: {this.props.appState.timer}</button>
      </PageWrapper>
    )
  }
}